package com.mollytask.util;

import android.content.Context;
import android.widget.Toast;


/**
 * Created by freshxu on 2016/11/4.
 */

public class DialogUtils {
    private static DialogUtils dialogUtil;

    private static Context mContext;

    private static Toast toast;

    public static DialogUtils getInstant(Context context) {
        if (dialogUtil == null) {
            dialogUtil = new DialogUtils();
        }
        mContext = context;
        return dialogUtil;
    }

    private DialogUtils() {
    }


    public static void showToast(Context context, String content) {
        if (toast == null) {
            toast = Toast.makeText(context,
                    content,
                    Toast.LENGTH_SHORT);
        } else {
            toast.setText(content);
        }
        toast.show();
    }

}
